//
//  UITextField+RightImg.m
//  copyrightTrading
//
//  Created by 郭子一 on 2020/10/6.
//  Copyright © 2020 郭子一. All rights reserved.
//

#import "UITextField+RightImg.h"


@implementation UITextField (RightImg)
/**
 *  给UITextField设置右侧的图片
 *
 *  @param textField UITextField
 *  @param imageName 图片名称
 */
-(void)setRightViewWithImageName:(NSString *)imageName size:(CGSize)size{
    
    UIImageView *rightView = [[UIImageView alloc]init];
    rightView.image = [UIImage imageNamed:imageName];
    rightView.size = size;
    rightView.contentMode = UIViewContentModeCenter;
    self.rightView = rightView;
    self.rightViewMode = UITextFieldViewModeAlways;
    
}
@end
